Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

ci: pin only torch to the PyTorch index in the examples job - #402

Merged
tae898 merged 1 commit into
mainfrom
ci/examples-torch-only-pytorch-index
Oct 21, 2026
Merged

tae898 merged 1 commit into
mainfrom
ci/examples-torch-only-pytorch-index

Conversation

@tae898

@tae898 tae898 commented Oct 21, 2026

Copy link
Copy Markdown

Fixes #401.

The examples job set UV_INDEX=https://download.pytorch.org/whl/cpu with UV_INDEX_STRATEGY=unsafe-best-match, so uv asked the PyTorch index about every package and a 503 there failed jobs that do not need torch (PR #391 and PR #395, on /whl/cpu/rich/ and /whl/cpu/h11/). The "Install example dependencies" step now writes a minimal uv project to $RUNNER_TEMP that lists the same packages and pins only torch to the PyTorch CPU index ([tool.uv.sources] plus an index with explicit = true), and all four example steps run uv run --project "$EXAMPLE_PROJECT" --python <version> --with <wheel> python. --no-project reads no [tool.uv.sources] and a requirements file cannot mark an index explicit, so a project is the mechanism that works here. UV_HTTP_RETRIES is raised from 3 to 6. ci-setup.md describes the new setup.

Local check on the same package list (Python 3.12, uv lock, then the step script run for real with the built wheel): the resolved versions are identical to the old setting (67 packages, no differences, torch 2.14.1+cpu, numpy 2.5.4, rich 15.0.0, h11 0.16.0). uv lock -v --no-cache shows the PyTorch index queried for 1 package (torch) instead of 66, and numpy, rich, h11 and requests locked from pypi.org. The old setting also took five torch dependencies (jinja2, sympy, mpmath, colorama, typing-extensions) from the PyTorch index at the same versions; they now come from PyPI. actionlint, bash -n on the extracted step and the pre-commit hooks pass. I did not run the examples, and CI has not run yet.

🤖 Generated with Claude Code

The examples job set UV_INDEX with unsafe-best-match, so uv asked download.pytorch.org about every package and a PyTorch 503 failed jobs that do not need torch. Run the examples in a throwaway uv project that marks the PyTorch CPU index explicit and pins torch alone to it, and raise UV_HTTP_RETRIES. Fixes #401.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 force-pushed the ci/examples-torch-only-pytorch-index branch from 692f4c4 to 9bff3cb Compare October 21, 2026 12:11
@tae898
tae898 merged commit 9be5ffc into main Oct 21, 2026
22 of 23 checks passed
@tae898
tae898 deleted the ci/examples-torch-only-pytorch-index branch October 21, 2026 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: examples send every package lookup to download.pytorch.org, so a PyTorch index outage fails unrelated jobs

1 participant